package org.streets.workflow.engine.event;

import java.util.EventObject;

import org.streets.workflow.engine.INode;
import org.streets.workflow.engine.IToken;


/**
 * node监听器
 *
 */
@SuppressWarnings("serial")
public class NodeEvent extends EventObject {
	
	public static final int NODEINSTANCE_TOKEN_ENTERED = 1;
	public static final int NODEINSTANCE_FIRED = 2;
	public static final int NODEINSTANCE_COMPLETED = 3;
	public static final int NODEINSTANCE_LEAVING = 4;
        
	int eventType = -1;
	private IToken token = null;

	private NodeEvent(){
		super(null);
	}
	public NodeEvent(INode source){
		super(source);
	}
	
	public IToken getToken() {
		return token;
	}

	public void setToken(IToken tk) {
		this.token = tk;
	}

	public int getEventType() {
		return eventType;
	}

	public void setEventType(int eventType) {
		this.eventType = eventType;
	}
	
}
